$def with (settings, widgets)

<script type="text/javascript">
$$(document).ready(function() {
    $$(".upgrade").click(function(){
        process = $$(this).attr("process")
        $$("#spinner-"+process).css("visibility", "visible");
        $$.post( "/ajax", { 
            'func': "upgrade",
            'process': process     
        }).done(function( data ) {
            $$("#spinner-"+data.process).css("visibility", "hidden");
            $$("#update-"+data.process).click();
        });
    });  
    $$("#opkg-update").click(function(){
        $$.post( "/ajax", { 
            'func': "opkg_update"
        }).done(function( data ) {
            if(data.ok){
                location.reload();
            } 
        });
    });  
});

function highlight(ok, id){
    if(ok){
        $$(id).effect( "highlight", 
            {color:"green"}, 1000 );
    } else {
        $$(id).effect( "highlight", 
            {color:"red"}, 1000 );
    }
}
</script>


<h1><img src="static/images/ok.png" style="width: 30px; padding: 2px">This Thing works!</h1>
<p>IP adress: <b>$settings["ip_addresses"]</b></p>
<p>URL: <b>$settings["url"]</b></p>
$for widget in widgets:
    $:widget
